import request from "@/utils/request"

export const illnessList = (search) =>
    request({
        url: "/illAll",
        method: "get",
        params: {
            illName: search.illnessName,
            offset: search.offset,
            limit: search.limit
        }
    })

export const deleteIllness = (id) =>
    request({
        url: "/deleteIll" + id,
        method: "delete",
    })

export const addIllness = (illNess) =>
    request({
        url: "/addIllness",
        method: "post",
        data: illNess
    })

export const illnessBefore = (id) =>
    request({
        url: "/illBeforeById" + id,
        method: "post"
    })

export const illUpdate = (illness) =>
    request({
        url: "/illnessUpdate",
        method: "put",
        data: illness
    })